package structure.composite;

import java.util.ArrayList;
import java.util.List;

public class A {
	
	private String name;

	private List<A> a = new ArrayList<>();
	
	public A(){}
	
	public A(String name) {
		this.name = name;
	}
	
	public void putA(A e){
		a.add(e);
	}
	
	@Override
	public String toString() {
		return "name=" + name;
	}
	public List<A> getA() {
		return a;
	}
	public void setA(List<A> a) {
		this.a = a;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
}
